﻿<!DOCTYPE html>
<!--作业许可证管理-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="../static/js/common.js"></script>
    <script src="../static/js/Resource/JobSafetyManagement.js"></script>
    <script src="../static/js/Mock/JobSafetyManagement.js"></script>
    <style>
        .el-dialog__body {
            height: 100% !important;
        }

        .el-dialog.is-fullscreen {
            overflow: hidden !important;
        }
    </style>

</head>

<body>
    
<div id="app" v-cloak>   
        <el-row>
            <el-col :span="24">
                <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
                    style="margin-bottom: 15px;">
                    <el-row>
                        <el-col class="head-tool">
                            
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />作业许可证审批列表</strong>
                            </div>
                            <span>
                                <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3"
                                    @click="onSubmit"></btn>
                                <btn :text="col.btnPrint" imgsrc="/static/images/general.png" linetype="3"
                                    @click="btnExportClick"></btn>
                                <btn-export-list url="xxxx" :forminline="this.formInline" linetype="4">
                                </btn-export-list>
                            </span>
                        </el-col>
                    </el-row>
                    <el-row class="popupW100">

                        <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input v-model="formInline.model.JobLicenseCode"
                                        :placeholder="JobLicenseManagement.JobLicenseCode" size="mini">
                                        <template slot="prepend">
                                            {{JobLicenseManagement.JobLicenseCode+mark.m}}
                                        </template>
                                    </el-input>
                                </el-form-item>
                            </div>
                        </el-col>
                        <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input v-model="formInline.model.JobLicenseUnit"
                                        :placeholder="JobLicenseManagement.JobLicenseUnit" size="mini">
                                        <template slot="prepend">
                                            {{JobLicenseManagement.JobLicenseUnit+mark.m}}
                                        </template>
                                    </el-input>
                                </el-form-item>
                            </div>
                        </el-col>

                        <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input size="mini">
                                        <template slot="prepend">
                                            {{JobLicenseManagement.ApplicationTime+'开始'+mark.m}}
                                        </template>
                                        <el-date-picker v-model="formInline.model.ApplicationTimeBegin" type="date"
                                            slot="suffix" size="mini" placeholder="选择日期">
                                        </el-date-picker>
                                    </el-input>
                                </el-form-item>
                            </div>
                        </el-col>
                        <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input size="mini">
                                        <template slot="prepend">
                                            {{JobLicenseManagement.ApplicationTime+'结束'+mark.m}}
                                        </template>
                                        <el-date-picker v-model="formInline.model.ApplicationTimeEnd" type="date"
                                            slot="suffix" size="mini" placeholder="选择日期">
                                        </el-date-picker>
                                    </el-input>
                                </el-form-item>
                            </div>
                        </el-col>

                        <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input size="mini">
                                        <template slot="prepend">
                                            {{JobLicenseManagement.EffectiveStartTime+'开始'+mark.m}}
                                        </template>
                                        <el-date-picker v-model="formInline.model.EffectiveStartTime" type="date"
                                            slot="suffix" size="mini" placeholder="选择日期">
                                        </el-date-picker>
                                    </el-input>
                                </el-form-item>
                            </div>
                        </el-col>
                        <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input size="mini">
                                        <template slot="prepend">
                                            {{JobLicenseManagement.EffectiveStartTime+'结束'+mark.m}}
                                        </template>
                                        <el-date-picker v-model="formInline.model.EffectiveEndTime" type="date"
                                            slot="suffix" size="mini" placeholder="选择日期">
                                        </el-date-picker>
                                    </el-input>
                                </el-form-item>
                            </div>
                        </el-col>
                        <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                            <div class="elst-select-mini">
                                <el-form-item>
                                    <el-input v-model="formInline.model.JobLicensePeople"
                                        :placeholder="JobLicenseManagement.JobLicensePeople" size="mini">
                                        <template slot="prepend">
                                            {{JobLicenseManagement.JobLicensePeople+mark.m}}
                                        </template>
                                    </el-input>
                                </el-form-item>
                            </div>
                        </el-col>
                    </el-row>

                </el-form>
                <el-table ref="table" stripe :data="ListItem.tableData" :height="ListItem.tableHeight" border
                    @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%">
                    <el-table-column type="selection" align="center" width="55">
                    </el-table-column>
                    <el-table-column type="index" label="序号" :index="indexMethod" width="50"
                        show-overflow-tooltip="true"></el-table-column>
                    <el-table-column prop="ApplicationTime" :label="JobLicenseManagement.ApplicationTime"
                        show-overflow-tooltip="true" min-width="170">
                    </el-table-column>
                    <el-table-column prop="JobLicenseCode" :label="JobLicenseManagement.JobLicenseCode"
                        show-overflow-tooltip="true" width="170">
                    </el-table-column>
                    <el-table-column prop="JobLicenseUnit" show-overflow-tooltip="true" min-width="130"
                        :label="JobLicenseManagement.JobLicenseUnit">
                    </el-table-column>
                    <el-table-column prop="JobLicensePeople" show-overflow-tooltip="true" min-width="130"
                        :label="JobLicenseManagement.JobLicensePeople">
                    </el-table-column>
                    <el-table-column prop="JobLocation" show-overflow-tooltip="true" min-width="110"
                        :label="JobLicenseManagement.JobLocation">
                    </el-table-column>
                    <el-table-column prop="WorkRegion" :formatter="getDicValue" show-overflow-tooltip="true"
                        min-width="90" :label="JobLicenseManagement.WorkRegion">
                    </el-table-column>
                    <el-table-column prop="EffectiveStartTime" show-overflow-tooltip="true" min-width="170"
                        :label="JobLicenseManagement.EffectiveStartTime">
                    </el-table-column>
                    <el-table-column prop="EffectiveEndTime" show-overflow-tooltip="true" min-width="170"
                        :label="JobLicenseManagement.EffectiveEndTime">
                    </el-table-column>
                    <el-table-column width="53" prop="update" :label="col.btnApprova" fixed="right">
                        <template slot-scope="scope">
                            <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                                <i class="el-icon-edit"></i>
                            </button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-row type="flex" justify="end">
                    <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                        :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes"
                        :page-size="ListItem.pagesize" :layout="ListItem.layout" :total="ListItem.total">
                    </el-pagination>
                </el-row>
            </el-col>
        </el-row>
        <el-dialog title="作业许可证审批" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="90%" height="90%"
            top="10vh" fullscreen="true">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {


                mydata: WordAreaTree,
                ListItem: ListItem,
                formInline: {
                    model: { ApplicationTimeBegin: '', ApplicationTimeEnd: '', JobLicenseCode: '', JobLicenseUnit: '', JobLicensePeople: '', JobLocation: '', WorkRegionA: '', JobLicenseStatic: '', EffectiveStartTime: '', EffectiveEndTime: '' },
                    offset: 0,
                    limit: 10
                }
            }, created: function () {
                var currApp = this;
                window.onresize = function () {
                    currApp.ListItem.tableHeight = window.innerHeight -
                        currApp.$refs.table.$el.offsetTop - 60;
                    if (currApp.ListItem.tableHeight < 112) {
                        currApp.ListItem.tableHeight = 112;
                    }
                }
            },
            mounted: function () {
                //获取下拉菜单内容
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                btnExportClick: function () {
                    var downloadUrl = "";

                    //触发导出成功事件
                    this.$emit('success', downloadUrl);
                    this.$message({
                        message: '导出成功!',
                        type: 'success'
                    });
                },
                //表格序号连续化
                indexMethod: function (index) { return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1; },
                getDicValue: function (row, column, cellValue, index) {
                    return getTreeValue(this.mydata, cellValue);
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/JobLicenseManagement/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "../JobSafetyManagement/JobLicenseApp/JobLicenseApproval.html", id); },

                UserInput1: function (val, id) { DialogShow(this, val, "JobSafetyManagementInfo.html", id); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/JobLicenseManagement/GetList') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); }
            }
        });

    </script>
</body>

</html>